<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html class="no-js" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<link rel="stylesheet" href="http://apps.bdimg.com/libs/jqueryui/1.9.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
<script src="http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.js"></script>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="http://apps.bdimg.com/libs/jquery.cookie/1.4.1/jquery.cookie.js"></script>
<script src="http://apps.bdimg.com/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<head>
    <title>test.jsp</title>
    <script>
        $(function () {

        });

        function send() {
            var body = [];
            var data1 = {"name": "test1", "password": "gz1"};
            var data2 = {"name": "test2", "password": "gz2"};
            body.push(data1);
            body.push(data2);

            $.ajax({
                url: "<%=request.getContextPath()%>/friend/testr",
                method: "post",
                type: "json",
                contentType: "application/json",
                data: JSON.stringify(body),
                success: function (result) {
                    console.log(result);
                },
                complete: function () {
                }
            });
        }


        function testbinding() {
//            var user = {"name":"jim"};
            var date = new Date();
            $.ajax({
                url: "<%=request.getContextPath()%>/friend/test_binding?myDate=2017-06-25",
                method: "get",
                type: "json",
//                contentType:"application/json",
//                data:{"myDate":date},
                success: function (result) {
                    console.log(result);
                },
                complete: function () {
                }
            });
        }
    </script>
</head>
<body>
<div class="container">
    <c:forEach items="${userList}" var="item">
        <div>${item.uid}</div>
    </c:forEach>
</div>
</body>
</html>